Skip to content

Conversation

@codepitbull
Copy link
Contributor

@codepitbull codepitbull commented Oct 30, 2025

Motivation

Resolves #37845 and #37976

Changes

  • allow skipping certificate validation
  • The lifecycle of OPC UA was incomplete which could lead to a scenario where if the connection wasn't established during startup we wouldn't retry

@cla-bot cla-bot bot added the cla-signed label Oct 30, 2025
Copy link
Member

@caoccao caoccao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@codepitbull codepitbull force-pushed the feature/disable-cert-validation branch from 7146b85 to a22f84d Compare November 4, 2025 14:00
@codepitbull codepitbull marked this pull request as ready for review November 4, 2025 14:41
Copy link
Member

@caoccao caoccao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have some questions.

entry.getValue().stopAsync(true).get();
} catch (final InterruptedException | ExecutionException e) {
log.error("Exception happened while shutting down adapter: ", e);
throw new RuntimeException(e);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assuming an exception is thrown, the rest of protocol adapters are not stopped. Is this behavior expected?

throw new RuntimeException(e);
}
}).get(connectionTimeoutSeconds, TimeUnit.SECONDS);
log.debug("OPC UA client connected successfully for adapter '{}'", adapterId);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This logging statement is in the right place? If client.connect() throws a UaException, a success will still be printed?

quietlyCloseClient(client, false, faultListener, null);
return false;
}
} catch (final UaException e) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This catch will not be hit.

*
* @return true if connection is healthy, false otherwise
*/
public boolean isHealthy() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's the one I expect! Nice work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants